package org.applesline.desensitize.handle.impl;

import org.applesline.desensitize.constants.DesensitizeType;
import org.applesline.desensitize.handle.DesensitizeAdapter;
import org.springframework.stereotype.Component;

/**
 * @author liuyaping
 * @date 2022/1/13
 */
@Component
public class AllHandler extends DesensitizeAdapter {

    @Override
    public String doMask(String str) {
        if (isBlank(str)) {
            return "";
        } else {
            return  hide(str, 0, str.length()) ;
        }
    }
    @Override
    public DesensitizeType getFieldType() {
        return DesensitizeType.ALL;
    }
}
